# EquipmentData.gd（资源类脚本）
extends Resource
class_name EquipmentData

enum SlotType { WEAPON, TOOL, CLOTHING }

@export_category("Basic")
@export var slot_type: SlotType
@export var display_name: String
@export var weight: float

@export_category("Modifiers")
@export var stamina_cost_mod: float = 1.0
@export var eco_value_mod: float = 1.0
@export var weather_resistance: Dictionary

@export_category("Requirements")
@export var required_level: int = 1
@export var required_altitude: int = 0

# 动态天气抗性计算
func get_weather_resist(weather_type: String) -> float:
	return weather_resistance.get(weather_type, 1.0)

# 装备验证方法
func is_equippable(current_level: int, current_alt: int) -> bool:
	return current_level >= required_level && current_alt >= required_altitude
